#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>

#define offsetof(type,member) (size_t)&(((type*)0)->member)
#define SWAP(x) (x=((x&0x55555555)<<1)+((x&0xaaaaaaaa)>>1))
struct a
{
	char c1;
	int i;
	char c2;
};
int main()
{
	int a = 10;
	SWAP(a);
	printf("%d\n", a);
	printf("%d\n",offsetof(struct a, i));
}